//
//  ZBMoBanFiveHeadView.m
//  MoBan
//
//  Created by apple on 16/7/13.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "ZBMoBanFiveHeadView.h"
#import "selectView.h"
@interface ZBMoBanFiveHeadView()<selectViewDeleget>
@property(nonatomic,strong)UIView *view;
@property(nonatomic,strong)selectView *selectview;
@end

@implementation ZBMoBanFiveHeadView
-(selectView *)selectview
{
    if (!_selectview) {
        _selectview = [[selectView alloc]init];
        _selectview.deleget = self;
    }
    return _selectview;
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addUI];
    }
    return self;
}
-(void)addUI
{
    
    self.view = [[UIView alloc]init];
    self.view.backgroundColor = [UIColor grayColor];
    [self addSubview:self.view];
    
    [self addSubview:self.selectview];

}
-(void)btnClic:(selectButten *)btn
{
    if ([self.deleget respondsToSelector:@selector(ZBSegmentBtnClic:)]) {
        [self.deleget ZBSegmentBtnClic:btn.tag];
    }

}
-(void)layoutSubviews
{
    [super layoutSubviews];

    self.view.frame = CGRectMake(0, 0, KscrW, 10*Kscr);
    
    _selectview.frame = CGRectMake(0, 10*Kscr, KscrW, 40*Kscr);
    [_selectview gaveMestringArray:@[@"全部地区",@"默认排序",@"全部影院"]];

    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
